<?php
	include_once("../../defines.php");
	FunctionsHelper::includeFiles(
		array(
			PUBLIC_CONTROLLERS_DIRECTORY . 'news.php'
		)
	);

	$NewsC = new newsC();
	$News = $NewsC->getAll();

	header("Content-type: text/xml");
?>
<rss version="2.0" xmlns:media="http://www.atodotenis.com.ar/mrss/" xmlns:ynews="http://www.atodotenis.com.ar/rss/">
	<channel>
		<title>A Todo Tenis</title>
		<copyright>Copyright (c)<?php echo date("Y"); ?></copyright>
		<link>http://www.atodotenis.com.ar</link>
		<category>Noticias</category>
		<description>Sitio de tenis</description>
		<language>es-ar</language> 
		<lastBuildDate>2012</lastBuildDate>
		
		<ttl>90</ttl>
		<image>
			<title>A todo tenis</title>
			<width>195</width>
			<height>40</height>
			<link><?= PUBLIC_IMAGES_PATH;?>header.png</link>
			<url><?= PUBLIC_IMAGES_DIRECTORY;?>header.png</url>
		</image>
		<?php 
		foreach ($News as $PieceOfNews){ 
		?>
		<item>
			<title><?= $PieceOfNews->getTitle(); ?></title>
			<description><?= $PieceOfNews->getSubtitle()  . '<br />' . htmlentities($PieceOfNews->getText()); ?></description>
			<link>www.atodotenis.com.ar</link>
			<source>News</source>
			<category>News</category>
		</item>
		<?php 
		}
		?>	
	</channel>
</rss>
